How to give input from user in DXL?

Please tell me how to provide input from the user using DXL to any basic code?


Mayur Chaudhari - Fri Sep 15 02:06:53 EDT 2017

Re: How to give input from user in DXL?
Mike.Scharnow - Tue Sep 19 15:03:02 EDT 2017

DXL has a lot of GUI functions, see chapter "Dialog Boxes" in the DXL manual. Perhaps a simple "field" on a dialog is enough (see example for "field" in the DXL manual)?

Re: How to give input from user in DXL?
Mayur Chaudhari - Wed Sep 20 02:56:53 EDT 2017

Mike.Scharnow - Tue Sep 19 15:03:02 EDT 2017

DXL has a lot of GUI functions, see chapter "Dialog Boxes" in the DXL manual. Perhaps a simple "field" on a dialog is enough (see example for "field" in the DXL manual)?

Actually, i wanted to ask how can we take input just like we do in C or C++ programming? 

Re: How to give input from user in DXL?
Mike.Scharnow - Wed Sep 20 03:32:00 EDT 2017

Mayur Chaudhari - Wed Sep 20 02:56:53 EDT 2017

Actually, i wanted to ask how can we take input just like we do in C or C++ programming? 

And how would you do it in C or C++ if you have a Windows program (remember that you do not have a console)? 

I think you would always write a dialog, even in C++...

 

Well, alternatively, you could

- gather info from an environment variable

- read "preferences" from some ini file or from other sources, XML files, databases, ...

- read information from the registry

 

Re: How to give input from user in DXL?
PekkaMakinen - Wed Sep 20 04:31:45 EDT 2017

Mayur Chaudhari - Wed Sep 20 02:56:53 EDT 2017

Actually, i wanted to ask how can we take input just like we do in C or C++ programming? 

The DXL Reference has this example code for get(element or option)

DB exBox = create "Use of Get"  
DBE intIn = slider(exBox, "Integer:", 50, 0, 100)  
DBE stringIn = field(exBox, "String:", "Example", 20)  
void doGet(DB exBox) {
    int i = get intIn
    string s = get stringIn
    print i ", " s "\n"
} // doGet
apply(exBox, "Get", doGet)  
show exBox

 

Re: How to give input from user in DXL?
Mayur Chaudhari - Wed Sep 20 06:15:21 EDT 2017

PekkaMakinen - Wed Sep 20 04:31:45 EDT 2017

The DXL Reference has this example code for get(element or option)

DB exBox = create "Use of Get"  
DBE intIn = slider(exBox, "Integer:", 50, 0, 100)  
DBE stringIn = field(exBox, "String:", "Example", 20)  
void doGet(DB exBox) {
    int i = get intIn
    string s = get stringIn
    print i ", " s "\n"
} // doGet
apply(exBox, "Get", doGet)  
show exBox

 

Thanks, buddy actually I am new to DXL and want to learn more and more, could you please provide me few links to tutorials and stuff like that so that to become a pro.
 

Re: How to give input from user in DXL?
Mike.Scharnow - Wed Sep 20 07:37:49 EDT 2017

Mayur Chaudhari - Wed Sep 20 06:15:21 EDT 2017

Thanks, buddy actually I am new to DXL and want to learn more and more, could you please provide me few links to tutorials and stuff like that so that to become a pro.
 

Well, if you use the forum search and look for "learn dxl" or similar topics, you will find some posts with ideas, like e.g.

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014577411

https://www.ibm.com/developerworks/community/forums/html/topic?id=6e92af84-79b4-470a-89a2-1ec015e6251d

https://www.ibm.com/developerworks/community/forums/html/topic?id=800da7cc-53c5-4607-8ec4-2cd1561cecdb

 

Before you start working with DXL, it is important that you are a pro in _using_ DOORS (as an administrator). If you understood the basics of how DOORS works, you start reading the DXL manual, especially the first chapters, to understand how the GUI transforms to DXL. Read the example programs in the manual, read the scripts IBM provides in the dxl directory, read the posts here, start with small scripts and always work in a test database(!!!)